<template>
  <div class="footer">
    <div class="footer-left">
      <div class="integral">
        <span>我的积分</span>
        <span>{{integral}}</span>
      </div>
      <div>可兑换喜茶劵和丰富灵感周边</div>
    </div>
    <div class="footer-right">
      <van-icon class="icon-font" name="qr" />
      <span>会员码</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  computed: {
    integral() {
      var user = this.$store.getters.userInfo;
      console.log(user);
      if (user) {
        return user.integral;
      } else {
        return '***'
      }
    },
  },
};
</script>

<style scoped>
.footer {
  position: absolute;
  left: 0rem;
  right: 0rem;
  bottom: 1.4rem;
  height: 1.4rem;
  padding: 0rem 0.5rem 0.3rem 0.5rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  box-sizing: border-box;
}
.footer-left {
  height: 100%;
  width: 6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.footer-left .integral {
  font-size: 16px;
  color: #333;
}
.footer-right {
  height: 100%;
  width: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  border-left: 1px solid #f0f0f0;
  padding-left: 0.2rem;
}
.icon-font {
  font-size: 26px;
  margin-bottom: 0rem;
  color: #333;
}
.footer-right span {
  color: grey;
}
</style>